import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    Button,
    View
} from 'react-native';
import {TabNavigator} from 'react-navigation';
import {MCustomer} from './customer/index';


//我的客户 首页  个人中心

class Customer extends React.Component {
    static navigationOptions = {
        tabBarLabel: '我的客户',
        header : null
    };
    render() {
        return (
            <View style={styles.container}>
                <MCustomer navigation={this.props.navigation}/>
            </View>

        );
    }
}
class Index extends React.Component {
    static navigationOptions = {
        tabBarLabel: '首页',
        header : null

    };
    render() {
        return (
            <View style={styles.container}>
                <Text>index</Text>
                <Button
                    onPress={() => this.props.navigation.navigate('Login')}
                    title="go"
                />
            </View>

        );
    }
}
class Center extends React.Component {

    render() {
        return (
            <View style={styles.container}>
                <View>
                    <Text>个人</Text>
                    <Button
                        onPress={() => this.props.navigation.navigate('Modifypwd')}
                        title="修改密码"
                    />
                </View>
                <View>
                    <Button
                        onPress={() => this.props.navigation.navigate('')}
                        title="修改联系人"
                    />
                </View>
                <View>
                    <Button
                        onPress={() => this.props.navigation.navigate('')}
                        title="我的收藏"
                    />
                </View>
                <View>
                    <Button
                        onPress={() => this.props.navigation.navigate('')}
                        title="我的代金券"
                    />
                </View>
                <View>
                    <Button
                        onPress={() => this.props.navigation.navigate('')}
                        title="我的金融服务"
                    />
                </View>
                <View>
                    <Button
                        onPress={() => this.props.navigation.navigate('')}
                        title="退出登录"
                    />
                </View>
            </View>

        );
    }
}

const Main = TabNavigator({
    Customer: {
        screen: Customer
    },
    Index: {
        screen: Index
    },
    Center: {
        screen: Center,
        navigationOptions:{
            tabBarLabel: '个人中心',
            header : null
        }
    },
},{
    initialRouteName : 'Index',
    tabBarPosition:'bottom'
})

const styles = StyleSheet.create({
    container: {
        flex: 1
    }
});

export const IMain = Main;